<template>
	<div>
		<h1>{{ filterList }}</h1>
		<button @click="changeList">change List</button>
	</div>
</template>

<script>
import { computed, ref } from 'vue'
export default {
	name: 'App',

	setup() {
		const list = ref([1, 2, 3, 4, 5])
		let filterList = computed(() => {
			return list.value.filter((v) => v > 2)
		})
		function changeList() {
			list.value.push(Math.random() * 10)
		}
		return {
			filterList,
			changeList,
		}
	},
}
</script>
